package t327.service;

import com.aliyun.oss.OSS;
import org.springframework.beans.factory.annotation.Autowired;
import t327.pojo.until.Result;
import t327.service.iter.IAlliOSSService;
import t327.util.AliOSSUntil;

import java.util.HashMap;

public class AlliOSSServiceImpl implements IAlliOSSService {

    @Override//文件上传
    public HashMap uploadFiles(String localFile, String remoteFile) {
        HashMap OSSMap;
        AliOSSUntil aliOSSUntil=new AliOSSUntil();
        OSS ossClient = aliOSSUntil.CreatingClient();

        OSSMap = aliOSSUntil.uploadFile(ossClient, localFile, remoteFile);
        ossClient.shutdown();
        return OSSMap;
    }
}
